The present invention relates to a binary image processing apparatus which is suitable for use in an image reader employed in a facsimile machine or the like so as to display with black and white pixels, image data read by the image reader.
Conventionally, a facsimile machine or the like is provided with a binary image processing apparatus for outputting an image of an original document per predetermined pixel unit as binary signals representative of black and white pixels in accordance with density of the pixel unit. In the known binary image processing apparatus, the image face of the original document is scanned by a reading sensor formed by, for example, a charge coupled device (CCD) and an image signal having a level corresponding to density of the image of the original document per predetermined pixel unit is generated from the image of the original document. Then, binary image processing is performed such that the level of the image signal is discriminated into binary data corresponding to the black and white pixels, on the basis of a discrimination level set in accordance with density of the image of the original document.
In typical known binary image processing, average density slice method is employed as shown in FIG. 1. In this method, an average density AVE of pixels of a relatively wide area of, for example, 3 scanning lines.times.16 pixels is calculated by disposing a specific target pixel at a center of the area. When level of an image signal S of the target pixel is lower than the average density AVE by a predetermined value AVA or more, it is judged that the pixels are black pixels. Otherwise, it is judged that the pixels are white pixels. Namely, the image signal S obtained from the CCD or the like is based on quantity of light reflected from the face of the original document. Thus, as level of the image signal S becomes lower, the corresponding pixel is darker. On the contrary, as level of the image signal S becomes higher, the corresponding pixel is lighter.
As shown in FIG. 1, in average density slice method, a boundary line l1 is provided for discriminating an area of the black pixels and an area of the white pixels from each other. When the level of the image signal S is smaller than a minimum Smin, it is forcibly decided by the boundary line l1 that the pixels are black pixels regardless of the average density AVE. On the other hand, when the level of the image signal S is larger than a maximum Smax, it is forcibly decided by the boundary line l1 that the pixels are white pixels. Furthermore, when the level of the image signal S is disposed between the maximum Smax and the minimum Smin and is smaller than the average density AVE, it is decided that the pixels are black pixels forming a portion of characters.
In FIG. 1, the boundary line l1 is set lower by the predetermined value AVA than a line l2 which is proportional to the average density AVE and passes through an origin O. This is because in the case where an image of characters or signs recorded in black on, e.g., a grey background of the face of the original document is read, gradation of the binary data obtained by binary encoding is shifted to the white side such that noises are eliminated.
In the above described average density slice method, in order to obtain the average density AVE having the target pixel as the center of the area, average operation of the relatively wide area of, for example, 3 scanning lines.times.16 pixels is required to be performed. Thus, a line buffer memory for temporarily storing the image signal needs a large capacity, thereby resulting in rise of its production cost.
In FIG. 2(a), a solid line l3 represents changes of the image signal S on the scanning line and a broken line l4 represents changes of the average density AVE. Meanwhile, a one-dot chain line l5 represents changes of a threshold level Sh obtained by subtracting the predetermined value AVA from the average density AVE, i.e. Sh=AVE-AVA.
FIG. 2(b) shows results of binary encoding of the prior art average density slice method. Meanwhile, FIG. 2(c) shows results of desirable binary encoding. As will be seen from FIGS. 2(a) to 2(c), when an image of a thin line is subjected to binary encoding, the following problems will arise. Namely, in the case where a width of the line is smaller than a width of a single unitary reading pixel or density changes partially along the line with respect to the average density AVE calculated from the image signal S oriented in the direction along the line, obtained level of the image signal S does not become sufficiently small. Meanwhile, when changes of level of the image signal S are greater than changes of the average density AVE, the thin continuous solid line is displayed as a broken line formed by a plurality of thin lines in the binary image obtained by binary encoding, so that a portion of the line is erased undesirably.
Furthermore, FIG. 3 shows a prior art binary image processing apparatus. The image signal S is sequentially outputted for each pixel from the CCD or the like and is subjected to analog-digital conversion. Then, the image signal S is supplied to a line buffer 1 and the image signal S stored in the line buffer 1 is fed to another line buffer 2. The line buffers 1 and 2 have storage capacities corresponding to scanning lines of the image face of the original document, respectively. Based on the image signals stored in the line buffers 1 and 2 and the image signal S, binary data D is outputted for each pixel from a binary circuit 3. The binary data D is stored in a line buffer 4. Based on the binary data D and the binary data stored in the line buffer 4, a binary data correcting circuit 5 yields a binary output.
Conventionally, when an image of intermediate gradation is subjected to binary encoding, error diffusion method is employed in which after an error E obtained from binary data of vertically and laterally neighboring pixels of a specific target pixel, for example, 4 peripheral pixels of the target pixel have been added to the image signal S of the target pixel, binary encoding is performed. FIG. 4 shows a known circuit for implementing error diffusion method. The image signal for each pixel is supplied to an adder 6. The adder 6 also receives an error signal E to be described below. An additive signal Se obtained by adding the error signal E to the image signal S is fed to a comparator 7. On the basis of a threshold value Sh from a threshold setting circuit 8, the comparator 7 discriminates level of the additive signal Se so as to output the binary data D of the image signal S.
Thereafter, the binary data D is supplied to an error calculator 9. The error calculator 9 also receives the image signal S so as to calculate an error e of the pixel corresponding to the image signal S. Namely, when the binary data from the comparator 7 is 1, the error calculator 9 sets the error e at S. On the other hand, when the binary data from the comparator 7 is 0, the error calculator 9 sets the error e at (S-R) where character R denotes a constant.
The error e from the error calculator 9 not only is supplied, as an error eD, to a line buffer 11 through a delay of one pixel by a delay circuit 10 but is applied to a multiplier 12. The line buffer 11 has a storage capacity which is smaller than the number of pixels of one scanning line by two pixels. Assuming that each pixel has the error e as shown in FIG. 15(c), the error eD is supplied from the delay circuit 10 to the line buffer 11 and an error eA is outputted from the line buffer 11. The output eA from the line buffer 11 is changed to an error eB by a delay circuit 13 and the error eB is, in turn, changed to an error eC by a delay circuit 14. The errors eB and eC are applied to the multiplier 12.
The multiplier 12 supplies to an adder 15, values obtained by multiplying weighting factor k1, k2, k3 and k4 to the errors eA, eB, eC and eD, respectively. The adder 15 outputs, as an error signal E, a sum of these values. Namely, the error signal E is given by the following equation. EQU E=k1.multidot.eA+k2.multidot.eB 30 k3.multidot.eC+k4.multidot.eD
The circuit of FIG. 4 for implementing error diffusion method is usually obtained by adding the components to the circuit of FIG. 3. Therefore, in such known binary image processing apparatus, the line buffer 11 for storing the error e shown in FIG. 4 is required to be provided in addition to the line buffers 1 and 2 for temporarily storing the inputted image signal S and the line buffer 4 for storing the binary data D.